package com.mrd.gtimpframe.repository;

import com.mrd.gtimpframe.entity.GenProtocolUnite;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface GenProtocolUniteMapper {
    int deleteByPrimaryKey(String id);

    int insert(GenProtocolUnite record);

    int insertSelective(GenProtocolUnite record);

    GenProtocolUnite selectByPrimaryKey(String id);

    GenProtocolUnite selectByPrimaryKeyExtend(String id);

    int updateByPrimaryKeySelective(GenProtocolUnite record);
    int updateStatusByPrimaryKey(String id, String status);

    int updateByPrimaryKey(GenProtocolUnite record);

    List<GenProtocolUnite> selectByMap(Map<String,Object> params);

    int countByIdAndSupplierId(String id, String supplierId);

    GenProtocolUnite selectBySupplierIdAndStatusIsEffective(String supplierId);

    int updateAllStatusIfitShouldBeEffectiveOrUnvalid();

    List<GenProtocolUnite> selectByStatusIn(List<String> status);

    int batchUpdate(List<GenProtocolUnite> unites);

    Set<String> selectComIdByStatusInAndContainsPropKeys(@Param("status") List<String> status,@Param("propKeys") List<String> propKeys);
}
